# coding=utf-8
import time

import allure
from selenium import webdriver
from selenium.webdriver.common.by import By

from homework_web_po.base_page.base_page import BasePage
from homework_web_po.po.address_book_page import AddressBookPage



class HomePage(BasePage):

    _CONTACT_BTN = By.XPATH, "//*[text()='通讯录']"

    @allure.step("进入通讯录页面")
    def address_book(self):
        print("进入通讯页面")
        # self.driver.find_element(By.CSS_SELECTOR, '.ww_operationBar .js_add_member').click()
        time.sleep(4)
        self.click(*self._CONTACT_BTN)      # 解包
        return AddressBookPage(self.driver)


